/* eslint-disable jsx-a11y/alt-text */
import React, { Component } from 'react'
import Search from './Component/Search'
import List from './Component/List'



export default class App extends Component {

   state = {//    初始化状态
    //users值为数组
     users:[],
     isFirst:true, //是否为第一次打开页面
     isLoading:false, //标识是否处于加载中
     err:'' //存储请求相关的错误信息
   }

//    更新App的state
   updataAppState = (stateObj) =>{
      this.setState(stateObj)
   }


    render() {
        return (
            <div className="container">
             <Search updataAppState = {this.updataAppState}/>
             <List {...this.state}/>
          </div>
        )
    }
}
